﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

using JupiterLibrary;

namespace KinnectInput.KinectIcons
{
    public class GizmoFader
    {
        Sprite spritex;
        public float Opacity = 0f;
        float timeToFade;

        public GizmoFader(Texture2D tex, Rectangle r)
        {
            spritex = new Sprite();
            spritex.Texture = tex;
            spritex.SetRectangle ( r);
            spritex.SetAlpha(1f);
            spritex.Update();
        }
        //public void Update()
        //{
        //    //Opacity =(float) Math.Abs(Math.Sin(timeToFade));
        //    //if (Opacity >= 0.9)
        //    //{
        //    //    if(Jupiter.soundPing.State==SoundState.Stopped)
        //    //        Jupiter.soundPing.Play();
        //    //}
        //    //timeToFade += Jupiter.At1Second(2);
        //    //spritex.SetAlpha(Opacity);
        //    spritex.SetAlpha(1f);
        //    spritex.Update();
        //}
        public void Draw()
        {
            spritex.Draw();
        }

        
    }
}
